const proxyMonetBase = '/api';
const MONET_IMGS_CONTENT_PATH = `${proxyMonetBase}/visualdata/file/visualfile/`;

export default {
  name: '对比层',
  code: 'custom_map_group_compare',
  version: '1.0.0',
  config: [
    {
      name: '默认配置',
      code: 'default',
      children: [
        {
          name: '默认状态图片',
          code: 'normalImg',
          type: 'InputUrl',
          value: `${MONET_IMGS_CONTENT_PATH}10cdd9a610694ce68dcbe865feb6250a.webp`,
        },
        {
          name: '选中状态图片1',
          code: 'selectImg',
          type: 'InputUrl',
          value: `${MONET_IMGS_CONTENT_PATH}shoulvSelectiocn.webp`,
        },
        {
          name: '选中状态图片2',
          code: 'selectImg2',
          type: 'InputUrl',
          value: `${MONET_IMGS_CONTENT_PATH}cc67a3cfab7b476bad840da1d986a60e.webp`,
        },
        {
          name: '未选中状态图片',
          code: 'forgetImg',
          type: 'InputUrl',
          value: `${MONET_IMGS_CONTENT_PATH}7d29d6c3de0a41bc96fafc1a6a3643cf.webp`,
        },
        {
          name: '图标向上偏移',
          code: 'top',
          value: 50,
          min: 1,
          max: 999,
          type: 'InputNumber',
          unit: 'px',
        },
        {
          name: '图标向左偏移',
          code: 'left',
          value: 50,
          min: 1,
          max: 999,
          type: 'InputNumber',
          unit: 'px',
        },
      ],
    },
    {
      name: '数据设置',
      code: 'dataConfig',
      children: [
        {
          name: '对比层大屏地址（用$分开）',
          code: 'screenUrl',
          value: 'http://xxx.com/screen?id1=$id2=',
          type: 'InputUrl',
        },
      ],
    },
  ],
  data: {
    field: [
      { name: 'lng', mapper: 'lng' },
      { name: 'lat', mapper: 'lat' },
      { name: 'id', mapper: 'id' },
      { name: 'info', mapper: 'text', optional: true },
      { name: 'value', mapper: 'count', optional: true },
      { name: 'url', mapper: 'url', optional: true },
    ],
    type: 1,
    value: JSON.stringify([
      {
        lat: 31.395141,
        lng: 100.180187,
        id: '17883',
        count: 187,
        text: '西单商圈',
        url: 'http://monet.urban-computing.cn/monet-doc/',
      },
      {
        lat: 37.314268,
        lng: 104.033458,
        id: '34',
        count: 58,
        text: '王府井商圈',
        url: 'http://monet.urban-computing.cn/monet-doc/',
      },
      {
        lat: 35.517994,
        lng: 112.050051,
        count: 31,
        id: '35',
        text: '崇文门商圈',
        url: 'http://monet.urban-computing.cn/monet-doc/',
      },
    ]),
  },
  events: {
    click: {
      description: '标签点击响应事件',
      fields: {
        id: {
          mapper: '',
          description: 'id',
          value: '',
        },
      },
    },
  },
};
